package com.woniuxy.user.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class RegisterVo {
    private Integer id;
    private String uname;
    private String password;
    private String type;
    private String name;
    private String gender;
    private String phone;
    private String idcard;
    private String bankcard;
    private String firmname;
    private String legalperson;
    private final Integer did = 5;
    private Integer rid;

    public void setType(String type) {
        this.type = type;
        switch (type) {
            case "个人投资用户":
                this.rid = 5;
                break;
            case "企业投资用户":
                this.rid = 6;
                break;
            case "个人借款用户":
                this.rid = 7;
                break;
            case "企业借款用户":
                this.rid = 8;
                break;
            case "个人担保用户":
                this.rid = 9;
                break;
            case "企业担保用户":
                this.rid = 10;
                break;
        }
    }
}
